package com.lt.test.provider.service;

import com.alibaba.dubbo.config.annotation.Service;
import com.lt.test.api.KtActivitiLeaveService;
import com.lt.test.common.util.StringUtils;
import com.lt.test.provider.dao.KtActivitiLeaveDao;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;

import javax.annotation.Resource;
import java.util.Date;
import java.util.List;
import java.util.Map;

@Service(version = "1.0.0")
public class KtActivitiLeaveServiceImpl implements KtActivitiLeaveService {

    private static final Logger logger = LoggerFactory.getLogger(KtActivitiLeaveServiceImpl.class);

    @Resource
    private KtActivitiLeaveDao ktActivitiLeaveDao;


    @Override
    public List<Map<String,Object>> query(Map parameter) {
        return ktActivitiLeaveDao.query(parameter);
    }

    @Override
    public int create(Map parameter) {
        parameter.put("id", StringUtils.getUUID());
        parameter.put("leaveDate", new Date());
        parameter.put("state", '1');
        return ktActivitiLeaveDao.create(parameter);
    }

    @Override
    public int update(Map parameter) {
        return 0;
    }

    @Override
    public int save(Map parameter) {
        return 0;
    }

    @Override
    public int delete(Long id) {
        return 0;
    }

    @Override
    public Map findById(Long id) {
        return null;
    }

    @Override
    public int batch(List values) {
        return 0;
    }

    @Override
    public int batchUpdate(List values) {
        return 0;
    }

    @Override
    public int batchDelete(List values) {
        return 0;
    }
}
